import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

class Person implements Cloneable{
    public String name;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}

public class ExceptionLearn {


    public static void main(String[] args) throws CloneNotSupportedException {
        Person p = new Person();
        Person p2 = (Person) p.clone();

//        System.out.println(10/0);
    }

    //-----------------------------------------------------------------------------

    public static  void func2(int[] array){
        if(array == null){
            throw new NullPointerException("array == null 了！");
        }
    }
    public static void main4(String[] args) {
        func2(null);
    }

    //--------------------------------------------------------------------------------
    public static void main3(String[] args) {
        int[] array = null;
        System.out.println(array[10]);
        System.out.println("Hi");
    }
    public static void main2(String[] args) {
        System.out.println("=======================================================");
        int[] array = {1,2,3,4};
        System.out.println(array[10]);
        System.out.println("after");
    }


    public static void main1(String[] args) {
        System.out.println("=======================================================");
        System.out.println(10/0);
    }
}
